package com.ruoyi.video.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.video.mapper.VideoRecordsMapper;
import com.ruoyi.video.domain.VideoRecords;
import com.ruoyi.video.service.IVideoRecordsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 生成记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-07
 */
@Service
public class VideoRecordsServiceImpl implements IVideoRecordsService 
{
    @Autowired
    private VideoRecordsMapper videoRecordsMapper;

    /**
     * 查询生成记录
     * 
     * @param id 生成记录主键
     * @return 生成记录
     */
    @Override
    public VideoRecords selectVideoRecordsById(Integer id)
    {
        return videoRecordsMapper.selectVideoRecordsById(id);
    }

    /**
     * 查询生成记录列表
     * 
     * @param videoRecords 生成记录
     * @return 生成记录
     */
    @Override
    public List<VideoRecords> selectVideoRecordsList(VideoRecords videoRecords)
    {
        return videoRecordsMapper.selectVideoRecordsList(videoRecords);
    }

    /**
     * 新增生成记录
     * 
     * @param videoRecords 生成记录
     * @return 结果
     */
    @Override
    public int insertVideoRecords(VideoRecords videoRecords)
    {
        videoRecords.setCreateTime(DateUtils.getNowDate());
        return videoRecordsMapper.insertVideoRecords(videoRecords);
    }

    /**
     * 修改生成记录
     * 
     * @param videoRecords 生成记录
     * @return 结果
     */
    @Override
    public int updateVideoRecords(VideoRecords videoRecords)
    {
        videoRecords.setUpdateTime(DateUtils.getNowDate());
        return videoRecordsMapper.updateVideoRecords(videoRecords);
    }

    /**
     * 批量删除生成记录
     * 
     * @param ids 需要删除的生成记录主键
     * @return 结果
     */
    @Override
    public int deleteVideoRecordsByIds(String ids)
    {
        return videoRecordsMapper.deleteVideoRecordsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除生成记录信息
     * 
     * @param id 生成记录主键
     * @return 结果
     */
    @Override
    public int deleteVideoRecordsById(Integer id)
    {
        return videoRecordsMapper.deleteVideoRecordsById(id);
    }
}
